package openai

import (
	"context"
	gogpt "github.com/sashabaranov/go-openai"
)

// 创建 fine tune
func (self *AppGPT) CreateFineTune(request *gogpt.FineTuneRequest) (gogpt.FineTune, error) {
	ctx := context.Background()
	return self.Client().CreateFineTune(ctx, *request)
}

func (self *AppGPT) CancelFineTune(fineid string) (gogpt.FineTune, error) {
	return self.Client().CancelFineTune(context.Background(), fineid)
}

func (self *AppGPT) GetFineTune(fineid string) (gogpt.FineTune, error) {
	return self.Client().GetFineTune(context.Background(), fineid)
}

func (self *AppGPT) DeleteFineTune(fineid string) (gogpt.FineTuneDeleteResponse, error) {
	return self.Client().DeleteFineTune(context.Background(), fineid)
}

func (self *AppGPT) ListFineTunes() (gogpt.FineTuneList, error) {
	return self.Client().ListFineTunes(context.Background())
}
